<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*" %>
<%@ page import="TaoWang.SendEmail4" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
</head>
<body>
<h1>使用 GET 方法读取数据</h1>
<ul>
<li><p><b>站点名:</b>
   <%
   //解决中文乱码的问题
   String name = new String((request.getParameter("name")).getBytes("ISO-8859-1"),"UTF-8");
   String url = new String((request.getParameter("url")).getBytes("ISO-8859-1"),"UTF-8");
   
   //String greeting="菜鸟教程"；
   String sentTo="962482033@qq.com";
  
   
   int number = 520;
   int myNumber=79358;
   
   String text="小仙女";
   
   sentTo="I Love You"+sentTo + text;
   number=number+1314+myNumber;
   
   //准备邮件发送
   int res=-1;
   String resTxt="发送不成功";

   //邮件发送
   String subject=name;
   text=url;
   
   SendEmail4 m=new SendEmail4();
   res=m.send(subject,text);
   
   //判断邮件是否成功
  String message="";
  if(res <1){
	  System.out.print("这是if语句");
	 // message="这是if语句";
	 resTxt="发送不成功";
  }
  if(res==1)
  {
	  resTxt="发送成功";
  }
  else
  {
	  resTxt="发送不成功";
  }
  //报告发送状态，并显示在页面
   
   
   %>
   
   <%= (text+","+name)%>
</p></li>
<li><p><b>网址:</b>
 <%=url%>
</p></li>

<li><p><b>发送站长:</b>
<%=sentTo%>
</p>
<p><%=resTxt%></p>
</li>
</ul>
</body>
</html>